Skip to content

Conversation

@emma-sg
Copy link
Member

@emma-sg emma-sg commented Oct 28, 2025

For context & flow diagram, see https://github.com/webrecorder/cashew/pull/59

I intend to also add some tests for the new add quotas endpoint, have not yet gotten to it.

@emma-sg emma-sg marked this pull request as draft October 28, 2025 22:45
@emma-sg emma-sg force-pushed the additional-minutes-addon-purchase branch 2 times, most recently from 4ee2020 to 82a6295 Compare November 4, 2025 23:40
@emma-sg emma-sg force-pushed the additional-minutes-addon-purchase branch from 5ad2648 to 93fd027 Compare November 10, 2025 22:31
@emma-sg emma-sg force-pushed the additional-minutes-addon-purchase branch from d6084da to 208d0eb Compare November 12, 2025 22:00
- add get_checkout_url method to create checkout session for additional
minutes - add /checkout/execution-minutes endpoint to handle addon
purchase requests (this will need to be updated in dev/prod playbooks) -
update CI workflows to remove portalUrl suffix from secret value - add
test endpoint in echo server to mock checkout response
convert to json before converting to output type

more debugging

fix model type

pass return url to checkout session request

fix fn ordering

correctly pass in headers

include content-type header

fix double encoding as json

properly dump model to dict in requests
try using `org_dep` directly in quotas endpoint

this should be safe, since there's still a check for if user is
superuser

allow shared secret in org dep
- adds separate "add-ons" section to display extra execution minutes and
gifted execution minutes when present - renames renderQuotas to
renderMonthlyQuotas for clarity
entire orgs router

- renames `shared_secret_or_active_user` to `shared_secret_or_superuser`
to better reflect that it only allows superuser, not all users - moves
the `quotas` endpoint to the app router to allow using
`org_superuser_or_shared_secret_dep` dependency specifically - removes
its user dependency & extra check for superuser, since user is required
to be superuser in `superuser_or_shared_secret_dep` (depended on by
`org_superuser_or_shared_secret_dep`) - adds a couple more types to
`init_subs` arguments
@emma-sg emma-sg force-pushed the additional-minutes-addon-purchase branch from 208d0eb to e2b3dd2 Compare November 12, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants